package com.example.springdesignpattern.strategy.service.impl;

import com.example.springdesignpattern.strategy.entity.MsgInfo;
import com.example.springdesignpattern.strategy.service.MsgHandleService;
import com.example.springdesignpattern.strategy.util.MSG_TYPE;
import com.example.springdesignpattern.strategy.util.MsgHandler;
import org.springframework.stereotype.Service;

@Service
@MsgHandler(MSG_TYPE.TEXT)
public class TextMsgHandleServiceImpl implements MsgHandleService {

    @Override
    public void handleMsg(MsgInfo msgInfo) {
        System.out.println("处理文本消息："+msgInfo.getContent());
    }
}
